home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Taifun / Taifun 054 (1988-05-15)(Ossowski, Stefan)(DE)(PD).zip / Taifun 054 (1988-05-15)(Ossowski, Stefan)(DE)(PD).adf / MRBackup / MRBackup2.0 / MRBackup.TXT < prev    next >
Text File  |  1988-04-09  |  16KB  |  529 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                       MRBackup Version 2.0
  18.  
  19.                    A Hard Disk Backup Utility
  20.                              for the
  21.                          Commodore Amiga
  22.  
  23.  
  24.                          2 January 1988
  25.  
  26.                      Author: Mark R. Rinfret
  27.                      
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. Introduction
  76.  
  77.      This  document   describes   a   program,   named   MRBackup
  78. (pronounced M R Backup, not  Mister  Backup :-), which will allow
  79. you to backup an Amiga hard  disk  drive to floppy disk media.  I
  80. wrote MRBackup primarily out of my  own need.  I also saw it as a
  81. means for learning more about programming  the Amiga.  If you are
  82. already familiar with this  program,  you may want to jump to the
  83. "Changes" section at the end of  this  document.  Otherwise, read
  84. on.
  85.  
  86.      MRBackup is  reasonably  flexible,  allowing  you to back up
  87. individual directories, directory trees or a whole disk.  You can
  88. backup from  one  directory  hierarchy  and  restore  to another.
  89. Incremental backups can be  performed  based on file modification
  90. dates.  Just for fun, MRBackup also talks.  Though this is mostly
  91. frivolous, the speech  capability  provides a method for alerting
  92. you that a new output disk is required for formatting.
  93.  
  94.      MRBackup is not fast.  When  choosing  a  method for packing
  95. the backup data, a  fast-scan  approach  with  specialized backup
  96. directory  structure  was   considered.   However,  there  is  an
  97. inherent danger in  committing  multiple  files  to a specialized
  98. file system which can only be  accessed  through a solitary piece
  99. of software.  I decided  to  maintain  the  AmigaDOS  file system
  100. structure which has a  great  deal  of  integrity  and allows the
  101. backup media to be accessed by  standard  software.  When I do it
  102. again, I'll probably  go  with  the  specialized  approach  - the
  103. current method is just too darned slow.
  104.  
  105.      The user should take a serious and organized approach to his 
  106. backup methods, however.  I highly recommend that backup listings
  107. be kept in a safe  place  (I  use  a  3-ring  binder)  and backup
  108. floppies be stored safe  from  magnetic  damage  or other hazards
  109. (like spilled coffee - argh!).  A truly committed individual will
  110. backup his entire disk once a  month,  once  a week and "areas of
  111. interest" once a day (default).  
  112.  
  113.      MRBackup attempts to  economize  on  output  media  usage by
  114. using data compression/decompression (at the cost of time).  This
  115. is an option which can be  enabled/disabled  via  menu selection.
  116. The compression routine used was lifted  from the Un*x "compress"
  117. program but has been  adapted  to  employ  buffering and AmigaDOS
  118. I/O. 
  119.  
  120.  
  121. Operation
  122.  
  123.      To use MRBackup, click on the program  icon or type MRBackup
  124. at the CLI prompt.  A new window will  open in which you will see
  125. a STOP sign,  some  other  gadgetry,   and  a  couple of embedded
  126. windows.  If you click with the right  mouse button and drag from
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139. left to right across the menu bar, you'll see the various program  
  140. menus which control MRBackup's operation.
  141.  
  142.  
  143.      The  "Pathname  Specifications"  window  is  where  you tell
  144. MRBackup where data is coming from and going to.  It is important
  145. to note that the meanings of "Home Path" and "Backup Path" remain
  146. the same for a backup or a restore operation.  That is, the "Home
  147. Path" always refers to the files' normal "home" and "Backup Path"
  148. always refers to the location where the copies are kept.  
  149.  
  150.      The "Listing Path" refers to  the  destination of a detailed
  151. listing of the contents of the  backup  floppies  and may specify
  152. the printer (default) or a file on the hard disk.  The listing is
  153. an option which may be enabled/disabled via menu selection.  
  154.  
  155.      The "Exclude Path",  if  specified,  is  the  name of a file
  156. which contains lines describing files  which should not be backed
  157. up. Any filename matching an entry  in this list will be excluded
  158. from  the   backup.    The   exclude   file   consists   of  file
  159. specifications, one per line,  or  comments (a line with a number
  160. sign  - # - in column 1).   Blank  lines  are ignored.  Also, the
  161. specifications  are  case-insensitive.   That  is,  "SYSTEM"  and
  162. "system" are equivalent.  Examples:
  163.  
  164. # Exclude all object files
  165. *.o
  166. # Exclude all files beginning with "System":
  167. system*
  168. # Exclude all ".info" files:
  169. *.info
  170. # Exlude the "include" directory and all subdirectories:
  171. include
  172.  
  173.      You can customize the operation of  MRBackup through the use
  174. of   an   initialization   file.    This   file   must  be  named
  175. S:MRBackup.init.  With it, you may  set your desired defaults and
  176. Flags.  Each line in the file  consists  of an option setting, of
  177. the form:
  178.  
  179. OPTION = VALUE
  180.  
  181. or a comment.  Comment  lines  begin  with  a number sign (#).  A
  182. sample initialization file is included  which illustrates the use
  183. of all possible parameter settings.
  184.  
  185.  
  186. Backing Up a Disk
  187.  
  188.      To back up your hard disk, or a section  of it, first get an
  189. indication of the size of the  area  with  the Info command, "ls"
  190. (if you have it), List, etc.  If you multiply the total number of
  191. bytes (blocks * 512) by 0.65,  then  divide by 800000, you should
  192. get a very rough estimate (probably high) of the number of floppy
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205. disks required to back up that  area.   The floppies selected for
  206. backup need not be preformatted, as  MRBackup will format them as
  207. needed.  You should  be  sure,  however,  that  no  valuable data
  208. exists on them since  it  will  be  destroyed  by  the formatting
  209. process, if formatting is enabled.
  210.  
  211.      Once your floppies  are  ready  and  stacked  neatly  within
  212. reach, the fun begins.  First, modify the pathname specifications
  213. according to your requirements.  Normally,  the "Home Path" would
  214. be the device name of your hard  disk  or a directory on it (e.g.
  215. DH0:src) while the "Backup Path" would specify the device name of
  216. one of your floppy drives (e.g. DF0:).  While earlier versions of
  217. MRBackup were pretty rigid  in  this  regard,  this  version will
  218. allow  you  to   specify   ANY   disk   device   name  in  either
  219. specification.  PLEASE  BE  CAREFUL!   Many  users asked for this
  220. increased flexibility.  Just be aware  that it carries with it an
  221. increased risk that  you  now  have  more  "opportunity"  to burn
  222. yourself with improper pathname specifications.  
  223.  
  224.      Finally, the listing path may  be  set to the printer device
  225. (PRT:) or to the name of a file on  a hard drive or any available
  226. floppy drive not being used by the backup.  The listing path will
  227. be ignored if you disable  the  Generate  Listing  option  in the
  228. Flags menu.
  229.  
  230.      Make sure that you have set the desired options in the Flags
  231. menu, then select Backup  from  the  Project  menu.   You will be
  232. prompted with a  date  requester.   The  default  date value that
  233. appears is one day  earlier  than  the  current date.  If that is
  234. satisfactory, simply depress  the  RETURN key and the backup will
  235. commence.  If you desire to change  the date, edit the date value
  236. as necessary, using  the  standard  Amiga  conventions.  Remember
  237. that to clear the gadget  you  may  press  right-Amiga-x.  A null
  238. date value (all blanks) is allowed, should you want to backup all
  239. files in the  home  path,  regardless  of  their  creation dates.
  240. Otherwise, the required date and time format is MM/DD/YY HH:MM:SS
  241. (24 hour clock), the time specification being optional.  You will
  242. notice upward and  downward  pointing  "arrows"  above  each date
  243. component.  Clicking on the  appropriate  arrow will increment or
  244. decrement the respective portion of  the date.  Though the values
  245. normally  will   wrap   around,   not   affecting  adjacent  date
  246. components, certain situations  will  arise  where incrementing a
  247. day value may cause the month to increment (incrementing February
  248. 28 in a non-leap-year will  yield  March 31).  I just didn't feel
  249. the extra logic was worth it (I got lazy).
  250.  
  251.      Once  the  date  has  been  entered,   the  rest  is  fairly
  252. automatic.  You will be  prompted  immediately for a floppy disk.
  253. Insert it into the floppy drive that  you specified in the backup
  254. path and the disk requester  will  be satisfied.  Should you want
  255. to abort, simply hit the CANCEL  gadget  in the requester.  Also,
  256. you may abort the backup process at  any time by hitting the STOP
  257. gadget which appears in the top  left  area  of the screen.  This
  258. gadget is only checked prior to  the  start of the next file copy
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271. operation, so be patient if it does not respond immediately.
  272.  
  273.      As each floppy disk is filled, you should promptly label it.
  274. If formatting is enabled, MRBackup automatically generates volume
  275. names of the form:
  276.  
  277.      Backup MM-DD-YY.<sequence number>
  278.  
  279. Also to be noted is the fact  that  the files on the backup media
  280. retain the creation/modification date (I wish they were distinct)
  281. of their counterparts on the home device.
  282.  
  283.      You will find  that  the  Amiga's  multitasking  environment
  284. shines when using this program.  For those long-haul backups, get
  285. everything started, then shove MRBackup's  screen to the back and
  286. go start something useful.   MRBackup  will carry on without your
  287. watchful eye.  When it needs a disk,  the disk requester will pop
  288. out in front of everything and  MRBackup  will  ask (out loud, if
  289. speech is enabled ) for another  disk.   Having something else to
  290. do will make the time pass faster.
  291.  
  292.  
  293. Restoring the Backups
  294.  
  295.      No, this isn't always the bad part.   Backup and restore can
  296. also be useful when your  hard  disk  is  crowded and you have to
  297. "juggle" data around.  The restoration  process is quite similar,
  298. mechanically, to the  backup  process  -  it's just reversed.  In
  299. addition, the meanings of the pathname specifications are altered
  300. somewhat.  The "Home  path"  describes  the  destination  for the
  301. restored files and, as with the  backup  process, may specify the
  302. hard drive only or a directory specification.   The "Backup path"
  303. describes the file  or  files  to  be  restored  and  thus may be
  304. defined down to the file level (1 file).
  305.  
  306.      Note that on a restore operation,  the file creation date of
  307. the backup file is compared to  its  matching file (if it exists)
  308. on the home device.  If the file on the home device is newer, the
  309. file will not be replaced.  If  this  is desired, the file on the
  310. home device must  be  deleted  first.   A  later  version of this
  311. program will probably offer  a  "force"  or  "force  with prompt"
  312. option.  
  313.  
  314.  
  315. Warranties
  316.  
  317.      There are no warranties, either  expressed  or implied, with
  318. regard to the use of this  program.   You  didn't pay for it (did
  319. you?), so how you gonna' get  you  money  back?  Seriously, folk,
  320. I've tested this beastie fairly thoroughly (I intend to USE it!),
  321. but you know  how  things  go...there  may  be  a  bugaboo or two
  322. lurking in there.  Please exercise  it a little before committing
  323. your life (your precious data) to its care.
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Permissions
  339.  
  340.      This program is contributed to the public domain, as a token 
  341. of gratitude for the  many  wonderful  programs  I  have received
  342. through the same channels.  Feel free  to enhance, destroy, sell,
  343. distribute  or  otherwise  benefit  from  the  legal  use of this
  344. program.  I would love to hear  from  those  of you who find this
  345. either useful or useless (with specific  criticisms in the latter
  346. case).  If you make any  enhancements  (there's room for PLENTY),
  347. please share them with me and  the  rest  of the world.  I can be
  348. reached as:
  349.  
  350.      mrr@amanpt1.ZONE1.COM
  351.      ...rayssd!galaxia!amanpt1!mrr
  352.  
  353.      or
  354.  
  355.      Mark R. Rinfret
  356.      348 Indian Avenue
  357.      Portsmouth, RI 02871
  358.      401-846-7639 (home)
  359.      401-849-8900 (work)
  360.  
  361.  
  362. Changes Since the Last Release
  363.  
  364.      This section lists  changes  that  have  been  introduced in
  365. version 2.0.  Though I will  attempt  to be thorough, some things
  366. may slip through the cracks.  Please forgive any oversights.
  367.  
  368.  
  369. New User Interface
  370.  
  371.      MRBackup has undergone a major facelift.  It now has its own
  372. screen and color palette and  newly  designed menus and gadgetry.
  373. All  of  this  is  due  to  my   use  of  PowerWindows  2.0  from
  374. Inovatronics, a very worthwhile tool for Intuition programming.
  375.  
  376.      You will notice some new gadgetry on the screen.  I've added
  377. a "fuel  gauge"  which  indicates  the  "fullness"  of the output
  378. floppy.  There's a new  error  count  gadget  which  tracks total
  379. errors encountered and  a  "Current  Backup  Volume  Name" gadget
  380. which keeps you  informed  as  to  which  disk  you're  currently
  381. archiving to or restoring from.
  382.  
  383.      The Pathname  Specifications  window  has  a close box which
  384. will make the window go away.   A  new menu, Windows, has an item
  385. Pathnames which will reopen the window for you.
  386.  
  387.      A new command,  Save  Preferences,  allows  you to save your
  388. current  pathname  specs  and   flags  to  the  preferences  file
  389. (S:MRBackup.init).  The Flags menu has been totally redone.  This 
  390. menu previously consisted of item pairs (<feature>/No <feature> -
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403. pretty dumb, I must admit -  I  think  I  was intrigued by mutual
  404. exclusion at the time).   The  new  Flags  menu  just consists of
  405. check-marked items.   If  an  item  is  checked,  the  feature is
  406. enabled.
  407.  
  408.  
  409. Improved Error Handling
  410.  
  411.      This is usually the hardest  task  in  any programming chore
  412. and usually gets  the  least  attention.   Previous  versions  of
  413. MRBackup were no  exception.   Version  2.0,  however, has come a
  414. long  way  in   this   direction,   especially  in  the  area  of
  415. recoverability.  A new requester has  been introduced which lists
  416. your recovery (or abort)  options  when  certain errors have been
  417. detected.  Most significantly,  new  context-saving code has been
  418. added which will allow you  to  restart  a  backup  disk from its
  419. beginning,  should   a   non-recoverable   output   error  occur.
  420. Currently, this context information  is saved in memory.  I would
  421. like to save it to a file on the system disk.  This, coupled with  
  422. a new command (Resume Backup),  would  allow recovery even from a
  423. power failure.
  424.  
  425.  
  426. Increased Flexibility
  427.  
  428.      Previous versions of MRBackup were  fairly rigid with regard
  429. to home and backup path  specifications.   Version 2.0 allows ANY
  430. disk device to be referenced in either location.  On systems with
  431. dual floppy disks, you can even backup from floppy to floppy!
  432.  
  433.      MRBackup now allows you to suppress formatting of the backup
  434. disk.  This allows you to  "freshen"  a previously created backup
  435. set.  Though this option should be  used with care, it does speed
  436. things up and enhances MRBackup's partial backup capability.
  437.  
  438.  
  439. Big File Handling
  440.  
  441.      This is truly a last-minute item!  I personally don't have a
  442. file big enough to require this, so I didn't address the problem.
  443. However, enough users have  requested  this that I took a stab at
  444. it.  "Big" files, according  to  MRBackup,  are  files  which are
  445. larger than the  formatted  capacity  of  the  output media.  Iff
  446. (sic) you enable the "Do Big Files" and "Format Destination" Flag
  447. menu items, MRBackup will split big  files across multiple floppy
  448. disks.  If these options  are  not  enabled,  MRBackup  will just
  449. complain that the file is too big to back up and go on.
  450.  
  451.      Some of you will probably think  that  the method used to do
  452. this is somewhat kludgy, but it's  consistent with my approach to
  453. total AmigaDOS  compatibility.   When  backing  up  a big file, a
  454. special information  file,  MRBackup.bigfile,  is  written to the
  455. output disk.  The information  file  contains stuff like the file
  456. name, the "chunk number" (which piece of the file is this?),  the
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469. chunk size, and a flag which  indicates  whether this is the last
  470. chunk.  This information  is  used  by  the  restore operation to
  471. insure that the file chunks get reassembled in the correct order.
  472.  
  473.      In order to test this, I had to write  a program to create a
  474. big file (slightly larger  than  1  floppy  disk), archive it and
  475. restore it, then compare the two files.  To do all this, I had to
  476. first clean house on my 20 MB  hard  drive!   The big file backup
  477. appears to work OK.  I  think  it  could  use  some more testing,
  478. however, and would  encourage  you  to  test  drive it before you
  479. commit to it.
  480.  
  481.  
  482.    
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.